home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
bbs
/
cuser125.zip
/
CUCHECK.MEX
< prev
next >
Wrap
Text File
|
1997-07-12
|
14KB
|
559 lines
//////////////////////////////////////////////////////////////////////////////
// //
// CoolUser V1.25 (C)1996-1997 Neil Staib - Checked Part 2 //
// //
// MEX: Copywrite 1990, 1995 by Lanius Corporation. All Rights reserved. //
// //
//////////////////////////////////////////////////////////////////////////////
#include <max.mh> include <max.mh> //
#include <intpad.mh>
#define INCL_global
#define INCL_cooluser
#include <language.mh>
#include <cooluser.mh>
#ifdef internal_not
#define intnot 0
#else
#define intnot 1
#endif
void main()
{
char: inkey, nonstop;
string: name, inkeys;
int: nameint, nameco, done, opt, fd;
init_lang_cooluser();
// Read inkey key
fd:=open(str_st_dir_txt + "cucheck.2", IOPEN_READ);
readln(fd, inkeys);
close(fd);
remove(str_st_dir_txt + "cucheck.2");
if (inkeys = "u") // Hidden from Userlist
{
print(str_st_menu_display, 'U');
#ifdef hidden_opt
{
log(":COOLUSER: "+ str_st_log_hidden);
if (usr.noulist = 0)
{
usr.noulist := 1;
editoption(20, 34, 21, 34, Bool(usr.noulist), 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.noulist = 1)
{
usr.noulist := 0;
editoption(20, 34, 21, 34, Bool(usr.noulist), 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "t") // AVATAR Mode
{
print(str_st_menu_display, 'T');
#ifdef avatar_opt
{
log(":COOLUSER: "+ str_st_log_avatar);
if (usr.video = 3)
{
usr.video := 1;
goto start;
}
else
{
usr.video :=3;
goto start;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "e") // Full Screen Msg Editor
{
print(str_st_menu_display, 'E');
#ifdef msg_editor_opt
{
if (usr.bored = 0)
{
usr.bored := 1;
editoption(15, 34, 21, 34, Boolo(usr.bored) , 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.bored = 1)
{
usr.bored := 0;
editoption(15, 34, 21, 34, Boolo(usr.bored) , 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "q") // Quite Mode
{
print(str_st_menu_display, 'Q');
#ifdef quiet_opt
{
if (usr.notavail = 0)
{
usr.notavail := 1;
editoption(18, 34, 21, 34, Bool(usr.notavail) , 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.notavail = 1)
{
usr.notavail := 0;
editoption(18, 34, 21, 34, Bool(usr.notavail) , 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "n") // ANSI mode
{
print(str_st_menu_display, 'N');
#ifdef ansi_opt
{
log(":COOLUSER: "+ str_st_log_ansi);
if (usr.video = 1)
{
usr.video := 0;
usr.fsr:= 0;
usr.bored := 1;
goto start;
}
if (usr.video = 0)
{
usr.video := 1;
goto start;
}
if (usr.video = 3)
{
usr.video := 1;
goto start;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "w") // Full Screen Msg Viewer
{
print(str_st_menu_display, 'W');
#ifdef msg_viewer_opt
{
log(":COOLUSER: "+ str_st_log_scn_viewer);
if (usr.fsr = 0)
{
usr.fsr := 1;
editoption(15, 71, 21, 34, Bool(usr.fsr) , 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.fsr = 1)
{
usr.fsr := 0;
editoption(15, 71, 21, 34, Bool(usr.fsr) , 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "g") // Screen Length
{
print(str_st_menu_display, 'G');
#ifdef scn_length_opt
{
log(":COOLUSER: "+ str_st_log_scn_len);
linesno:
editoption(16, 71, 16, 71, "", 4, '░' , str_st_edit);
name:=inputuser(2);
nameint:=strtoi(name);
if (strlen(name) = 0)
{
goto start;
}
if (nameint < 10 or nameint > 66)
{
goto linesno;
}
usr.len := nameint;
goto start;
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "m") // More Prompt
{
print(str_st_menu_display, 'M');
#ifdef more_opt
{
log(":COOLUSER: "+ str_st_log_more);
if (usr.more = 0)
{
usr.more := 1;
editoption(17, 71, 21, 34, Bool(usr.more) , 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.more = 1)
{
usr.more := 0;
editoption(17, 71, 21, 34, Bool(usr.more) , 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "k") // Hot Keys
{
print(str_st_menu_display, 'K');
#ifdef hot_opt
{
log(":COOLUSER: "+ str_st_log_hot);
if (usr.hotkeys = 0)
{
usr.hotkeys := 1;
editoption(18, 71, 21, 34, Bool(usr.hotkeys) , 4, ' ', str_st_data_fields);
goto getfull;
}
if (usr.hotkeys = 1)
{
usr.hotkeys := 0;
editoption(18, 71, 21, 34, Bool(usr.hotkeys) , 4, ' ', str_st_data_fields);
goto getfull;
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "a") // Default Archiver
{
print(str_st_menu_display, 'A');
#ifdef qwk_opt
{
log(":COOLUSER: "+ str_st_log_arch);
pageheader();
print(str_st_text, "\n" , str_st_qwk, " ... : ",
str_st_data_fields, padleft(compressor_num_to_name(usr.compress), 10, ' '), COL_GRAY, '\n');
menu_cmd(620, "");
goto start;
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "z") // Default Protocol
{
print(str_st_menu_display, 'Z');
#ifdef protocol_opt
{
log(":COOLUSER: "+ str_st_log_prot);
pageheader();
if (intnot = 0)
{
display_file(str_st_dir_txt + "cuprot", nonstop);
do
{
inkey:=getch();
if (inkey = 13 or inkey = 'z' or inkey = 'y' or inkey = 'g' or inkey = 'x' or inkey = '1' or inkey = 's' or inkey = 'Z' or inkey = 'Y' or inkey = 'G' or inkey = 'X' or inkey = 'S')
{
done:=TRUE;
if (inkey=13)
{
print("\n\n", str_st_opt_disable, str_st_not_changed);
sleep(1);
}
if (inkey='z' or inkey = 'Z')
{
usr.def_proto:= PROTOCOL_ZMODEM ; // user's default protocol
}
else if (inkey='y' or inkey = 'Y')
{
usr.def_proto:= PROTOCOL_YMODEM ;
}
else if (inkey='g' or inkey = 'G')
{
usr.def_proto:= PROTOCOL_YMODEMG ;
}
else if (inkey='x' or inkey = 'X')
{
usr.def_proto:= PROTOCOL_XMODEM ;
}
else if (inkey='1')
{
usr.def_proto:= PROTOCOL_XMODEM1K ;
}
else if (inkey='s' or inkey = 'S')
{
usr.def_proto:= PROTOCOL_SEALINK ;
}
}
else
{
done:=FALSE;
}
}
while (done = FALSE);
goto start;
}
else
{
print(str_st_text, "\n" , str_st_protocol, " ... : ",
str_st_data_fields, padleft(protocol_num_to_name(usr.def_proto),
10, ' '), COL_GRAY, '\n');
menu_cmd(618, "");
}
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "i") // Location
{
print(str_st_menu_display, 'I');
#ifdef location_opt
{
log(":COOLUSER: "+ str_st_log_loc);
editoption(5, 34, 5, 34, "", 20, '░' , str_st_edit);
name:=inputuser(20
);
nameint:=strtoi(name);
if (strlen(name) = 0)
{
goto start;
}
usr.city := name;
goto start;
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "v") // Voice/Home Phone
{
print(str_st_menu_display, 'V');
#ifdef voice_opt
{
log(":COOLUSER: "+ str_st_log_voice);
voicephone:
editoption(6, 34, 6, 34, "", 15, '░' , str_st_edit);
name:= "";
nameco:=1;
inkey:=getch();
while(inkey<>13) // do this until we get <Enter>
{
if(inkey=8) // if we got a <Backspace>
{
if(nameco>1)
{
print("\b░\b");
nameco:=nameco-1;
name:=substr(name,1,strlen(name)-1);
}
else
name:="";
}
else
{
if(inkey = '0' or inkey = '1' or inkey = '2' or inkey = '3' or inkey = '4' or inkey = '5' or inkey = '6' or inkey = '7' or inkey = '8' or inkey = '9')
{
print(inkey);
name[nameco]:=inkey;
nameco:=nameco+1;
}
}
inkey:=getch();
}
nameint:=strtoi(name);
if (strlen(name) = 0)
{
goto start;
}
if (strlen(name) < phone_no)
{
goto voicephone;
}
usr.phone := name;
goto start;
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "d") // Business/ Data Phone
{
print(str_st_menu_display, 'D');
#ifdef data_opt
{
log(":COOLUSER: "+ str_st_log_business);
businessphone:
editoption(7, 34, 7, 34, "", 15, '░' , str_st_edit);
name:= "";
nameco:=1;
inkey:=getch();
while(inkey<>13) // do this until we get <Enter>
{
if(inkey=8) // if we got a <Backspace>
{
if(nameco>1)
{
print("\b░\b");
nameco:=nameco-1;
name:=substr(name,1,strlen(name)-1);
}
else
name:="";
}
else
{
if(inkey = '0' or inkey = '1' or inkey = '2' or inkey = '3' or inkey = '4' or inkey = '5' or inkey = '6' or inkey = '7' or inkey = '8' or inkey = '9')
{
print(inkey);
name[nameco]:=inkey;
nameco:=nameco+1;
}
}
inkey:=getch();
}
nameint:=strtoi(name);
if (strlen(name) = 0)
{
goto start;
}
if (strlen(name) < phone_no)
{
goto businessphone;
}
usr.dataphone := name;
goto start;
}
#else
{
optionbad();
goto start;
}
#endif
}
if (inkeys = "p") // Password
{
print(str_st_menu_display, 'P');
#ifdef password_opt
{
writefile("cucheck.4"); // Goto menu menu input.
return;
}
#else
{
optionbad();
goto start;
}
#endif
}
goto getfull;
start:
writefile("cucheck.1"); // Display Main Menu
return;
getfull:
writefile("cucheck.3"); // Display main menu options input first.
return;
}